package yuan.deng.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import yuan.deng.domain.User;

import java.util.List;

public interface UserMapper {
    @Select("select * from user")
    List<User> findAll();
    @Insert("insert into user values(#{id},#{name},#{gender},#{age},#{address},#{qq},#{email})")
    void userAdd(User user);
    @Delete("delete from user where id= #{id}")
    void del(String ids);
    @Select("select * from user where id=#{id}")
    User findById(String id);
    @Update("update user set gender=#{gender},age=#{age},name=#{name},address=#{address},qq=#{qq},email=#{email} where id=#{id}")
    void update(User user);
}
